import { request }  from "@/utils/request.js";
// 登录
export const login = (data) =>  {
	return request({url: 'admin/login', method: 'POST', data})
};
// 获取员工信息
export const personal = () =>  {
	return request({url: 'admin/personal'})
};
// 更新用户信息
// export const updatePersonal = (data) =>  {
// 	return request({url: 'staff/personal', method: 'PUT', data})
// };
// 订单列表
export const orders = (data) =>  {
	return request({url: 'admin/orders', data})
};
// 订单详情
export const ordersDetail = (id) =>  {
	return request({url: `admin/orders/${id}`})
};
// // 确认送达
// export const delivery = (id) =>  {
// 	return request({url: `staff/orders/${id}/delivery`, method: 'PUT'})
// };
// 配置信息
export const configs =  (data = {}) =>  {
	return request({url: 'configs', data})
};
// 订单列表
export const staffs = (data={}) =>  {
	return request({url: 'admin/staffs', data})
};
// 订单详情
export const assignStaff = (data) =>  {
	return request({url: `admin/orders/${data.id}/assign_staff/${data.staff_id}`, method: 'PUT', data})
};